package com.yukh.test.spring.proxy.cjava.demo1;

import org.apache.log4j.Logger;

public class StaticProxyTalk implements ITalk {
	private Logger logger = Logger.getLogger(this.getClass().getName());
	
	private ITalk somebody;

	public StaticProxyTalk(ITalk somebody) {
		this.somebody = somebody;
	}

	public void talk(String name) {
		log("talking start....");
		somebody.talk(name);
		log("talking ending...");
	}

	private void log(String message) {
//		logger.log(Level.INFO, message);
		System.out.println(message);
	}
}
